package com.yinNuo.collectWool.Task;

import com.yinNuo.collectWool.collectWoolHttp.ChinaUnicomHttps;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author: yinNuo
 * create at: 2021/12/1 下午12:56
 * @description: 苹果定时任务
 */

@Component
@EnableScheduling
@Slf4j
public class ChinaUnicomScheduledTask {

    @Autowired
    ChinaUnicomHttps chinaUnicomHttps;

    /**
     * 中国联通天天领现金签到任务
     *
     * @return
     */
    @Scheduled(cron = "10 1 0 * * ?")//每天凌晨一点十分执行
    public void chinaUnicom() {
        String ecs_token1 = "ecs_token=eyJkYXRhIjoiNWVjMzc1MzNjZDhiYmJhZTEwYWQ1NDMzYjIyNDJkODc1YThhMjBiZmJjYWIwZDNhOTI4NTNkYTcwODBmZGRlYjhiZTM2ZmViMGRjYWE0NGI5ZWIzNTEyYmJmYWZhMjNmM2NmZmNkNWE5Y2U0ZTdhZTU3ZmZiZDYyNmNkMTA1MjE3YzA5ZGI1ZTFiNWRkODcwMDY3YzBkNmUxNDc1OTQ5ZWI0Y2M0OWEyNzJlMjhmY2MxZTc0MWMzN2ZlMWFkMDMyIiwidmVyc2lvbiI6IjAwIn0=;";
        String ecs_token2 = "ecs_token=eyJkYXRhIjoiNWVjMzc1MzNjZDhiYmJhZTEwYWQ1NDMzYjIyNDJkODc1YThhMjBiZmJjYWIwZDNhOTI4NTNkYTcwODBmZGRlYjc2ZDRlOTIzMGRkNTk4MDhiOGFiYTBjYTQzMjQ2MDczNGRlOGZjY2MwOTNjNjgxMzQ4ODJlOWIzYWRhOGY5MzdlNDM4MTkwMmFlNTgzYmQ3NDUyMjk1M2YxYWU0NjY4YjAxZWEzMGJiMTk5ZmIwZTUxNmJlMjI4ZDdmYjQzNGZhIiwidmVyc2lvbiI6IjAwIn0=;";
        String ecs_token3 = "ecs_token=eyJkYXRhIjoiMTMyYzJlNGFmOTFiOWU0ZTRmMmMyMDQwOWVkNWU5NDIwOGFmN2U3OTUyYTk0YjU3NDFjMjE5MTMwNzRmYTMwMmU5ZmQwYmQ5ZWMxOTU1YmNjYTA0MmU4YTA2YTY3NThlNDFkMWM3NDAyYzJjMTk4MjAxZjg4ZTAxMWRhNzA4Yzk3M2M3YTQ4MjYzYzJlODFlOTQwNmJhODNiOTZlYWMyYmMyOTA0ZGRkNThhNDk5ZDVmMjJhZTdhNzMxZjM4ZWIzMDdjMjU5ZmNmMDVhYTc2MjZjMWUyYjkyNWFhMzliYTRmYjcwMDQwNWZjOTUxNTc0YjZiOGYyNWMwNjEwM2Q3YyIsInZlcnNpb24iOiIwMCJ9;";
        String result1 = chinaUnicomHttps.chinaUnicomEveryDaySign("13053055946", ecs_token1);
        String result2 = chinaUnicomHttps.chinaUnicomEveryDaySign("13282393069", ecs_token2);
        String result3 = chinaUnicomHttps.chinaUnicomEveryDaySign("13075569130", ecs_token3);
        log.info("中国联通天天领现金签到任务结果1:{}结果2：{}结果3：{}", result1, result2,result3);
    }

    public static void main(String[] args) {
        ChinaUnicomHttps chinaUnicomHttps = new ChinaUnicomHttps();
        //String ecs_token3 = "ecs_token=eyJkYXRhIjoiMTMyYzJlNGFmOTFiOWU0ZTRmMmMyMDQwOWVkNWU5NDIwOGFmN2U3OTUyYTk0YjU3NDFjMjE5MTMwNzRmYTMwMmU5ZmQwYmQ5ZWMxOTU1YmNjYTA0MmU4YTA2YTY3NThlNDFkMWM3NDAyYzJjMTk4MjAxZjg4ZTAxMWRhNzA4Yzk3M2M3YTQ4MjYzYzJlODFlOTQwNmJhODNiOTZlYWMyYmMyOTA0ZGRkNThhNDk5ZDVmMjJhZTdhNzMxZjM4ZWIzMDdjMjU5ZmNmMDVhYTc2MjZjMWUyYjkyNWFhMzliYTRmYjcwMDQwNWZjOTUxNTc0YjZiOGYyNWMwNjEwM2Q3YyIsInZlcnNpb24iOiIwMCJ9;";
        //String result3 = chinaUnicomHttps.chinaUnicomEveryDaySign("13075569130", ecs_token3);

        String ecs_token2 = "ecs_token=eyJkYXRhIjoiNWVjMzc1MzNjZDhiYmJhZTEwYWQ1NDMzYjIyNDJkODc1YThhMjBiZmJjYWIwZDNhOTI4NTNkYTcwODBmZGRlYjc2ZDRlOTIzMGRkNTk4MDhiOGFiYTBjYTQzMjQ2MDczNGRlOGZjY2MwOTNjNjgxMzQ4ODJlOWIzYWRhOGY5MzdlNDM4MTkwMmFlNTgzYmQ3NDUyMjk1M2YxYWU0NjY4YjAxZWEzMGJiMTk5ZmIwZTUxNmJlMjI4ZDdmYjQzNGZhIiwidmVyc2lvbiI6IjAwIn0=;";
        //String ecs_token3 = "ecs_token=eyJkYXRhIjoiMTMyYzJlNGFmOTFiOWU0ZTRmMmMyMDQwOWVkNWU5NDIwOGFmN2U3OTUyYTk0YjU3NDFjMjE5MTMwNzRmYTMwMmU5ZmQwYmQ5ZWMxOTU1YmNjYTA0MmU4YTA2YTY3NThlNDFkMWM3NDAyYzJjMTk4MjAxZjg4ZTAxMWRhNzA4Yzk3M2M3YTQ4MjYzYzJlODFlOTQwNmJhODNiOTZlYWMyYmMyOTA0ZGRkNThhNDk5ZDVmMjJhZTdhNzMxZjM4ZWIzMDdjMjU5ZmNmMDVhYTc2MjZjMWUyYjkyNWFhMzliYTRmYjcwMDQwNWZjOTUxNTc0YjZiOGYyNWMwNjEwM2Q3YyIsInZlcnNpb24iOiIwMCJ9;";
        //String result1 = chinaUnicomHttps.chinaUnicomEveryDaySign("13053055946", ecs_token1);
        String result2 = chinaUnicomHttps.chinaUnicomEveryDaySign("13282393069", ecs_token2);
        log.info("中国联通天天领现金签到任务结果=======>{}========>{}", result2);

    }
    //2022-03-31 00:08:04.984  INFO 14368 --- [taskScheduler-1] c.y.c.Task.ChinaUnicomScheduledTask      :
    // 中国联通天天领现金签到任务结果=======>
    // {"returnCode":"0","amount":"0.05","returnMsg":"ok","prizeId":"ZFGJBTTLXJ","winMsg":null}
    // ========>
    // {"returnCode":"0","amount":"0.08","returnMsg":"ok","prizeId":"ZFGJBTTLXJ","winMsg":null}


    //2022-04-01 00:01:37.479  INFO 24284 --- [taskScheduler-1] c.y.c.Task.ChinaUnicomScheduledTask      :
    // 中国联通天天领现金签到任务结果=======>
    // {"returnCode":"0","amount":"0.07","returnMsg":"ok","prizeId":"ZFGJBTTLXJ","winMsg":null}
    // ========>
    // {"returnCode":"100011","returnMsg":"前方通道抢修中，请稍后重新登录再试吧~","popupStyle":null,"havePrizePopupImg":null}
}